/*
 * @Author: qiang
 * @Date: 2021-12-26 17:31:23
 * @LastEditTime: 2021-12-28 22:35:54
 * @LastEditors: qiang
 * @Description: 路由表 左侧菜单项
 */

import { dynamic } from 'umi';
import {
  PieChartOutlined,
  ShoppingOutlined,
  UserOutlined,
  TagsOutlined,
  ShopOutlined,
  PictureOutlined,
  ProfileOutlined,
} from '@ant-design/icons';

export default [
  {
    path: '/dashboard',
    name: '首页统计',
    icon: <PieChartOutlined />,
    component: dynamic({
      loader: async function () {
        const { default: HugeA } = await require('@/pages/dashBoard');
        return HugeA;
      },
    }),
  },
  {
    path: '/user',
    name: '用户管理',
    icon: <UserOutlined />,
    component: dynamic({
      loader: async function () {
        const { default: HugeA } = await require('@/pages/user');
        return HugeA;
      },
    }),
  },
  {
    path: '/goods',
    name: '商品管理',
    icon: <ShoppingOutlined />,
    component: dynamic({
      loader: async function () {
        const { default: HugeA } = await require('@/pages/goods');
        return HugeA;
      },
    }),
  },
  {
    path: '/category',
    name: '分类管理',
    icon: <TagsOutlined />,
    component: dynamic({
      loader: async function () {
        const { default: HugeA } = await require('@/pages/category');
        return HugeA;
      },
    }),
  },
  {
    path: '/order',
    name: '订单管理',
    icon: <ShopOutlined />,
    component: dynamic({
      loader: async function () {
        const { default: HugeA } = await require('@/pages/order');
        return HugeA;
      },
    }),
  },
  {
    path: '/slide',
    name: '轮播管理',
    icon: <PictureOutlined />,
    component: dynamic({
      loader: async function () {
        const { default: HugeA } = await require('@/pages/slide');
        return HugeA;
      },
    }),
  },
  {
    path: '/comment',
    name: '评论管理',
    icon: <ProfileOutlined />,
    component: dynamic({
      loader: async function () {
        const { default: HugeA } = await require('@/pages/comment');
        return HugeA;
      },
    }),
  },
];
